package cn.tedu.egweibo5.base.config;

import cn.tedu.egweibo5.base.interceptor.LoginCheckInterceptor;
import cn.tedu.egweibo5.base.interceptor.MyInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author Justin Parker
 * @author 2024/8/15 23:18
 * @version 1.0
 */
@Configuration
public class InterceptorConfig implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {

        registry.addInterceptor(new LoginCheckInterceptor()).addPathPatterns("/v1/users/login");
    }
}
